package org.jeecg.modules.demo.shopprojectcart.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.shopprojectcart.entity.ShopProjectCart;

import java.util.List;
import java.util.Map;

/**
 * @Description: 项目购物车
 * @Author: jeecg-boot
 * @Date: 2022-01-14
 * @Version: V1.0
 */
public interface ShopProjectCartMapper extends BaseMapper<ShopProjectCart> {
    /**
     * 项目数量加1
     *
     * @param id
     */
    void addQty(@Param("id") String id);

    /**
     * 项目数量减1
     *
     * @param id
     */
    void reduceQty(@Param("id") String id);

    /**
     * 项目数量修改
     *
     * @param id
     * @param qty
     */
    void updateQty(@Param("id") String id, @Param("qty") Integer qty);

    /**
     * 查询购物车项目列表
     *
     * @param storeId
     * @param memberId
     * @return
     */
    List<Map<String, Object>> getListByMemberId(@Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize, @Param("storeId") String storeId, @Param("memberId") String memberId);

}
